<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddAgentIdToDownload extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::table('downloads', function (Blueprint $table) {
            $table->tinyInteger('up_status')->default(1)->after('status');
            $table->integer('agent_id')->default(0)->after('user_id');
            $table->string('fail_msg')->default('')->after('up_status');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::table('download', function (Blueprint $table) {
        });
    }
}
